export HCCL_CONNECT_TIMEOUT=600
export RANK_TABLE_FILE=/home/models/utils/hccl_tools/hccl_2p_67_172.17.0.3.json
export RANK_SIZE=2
export DEVICE_ID=0
export RANK_ID=0
export DEPLOY_MODE=0
export GE_USE_STATIC_MEMORY=1
rm -rf LOG0
mkdir ./LOG0
cp *.py ./LOG0
mkdir -p ./LOG0/ms_log
env > ./LOG0/env.log
export GLOG_log_dir=/home/models/official/nlp/Bert/LOG0/ms_log
export GLOG_logtostderr=0
cd /home/models/official/nlp/Bert/LOG0
taskset -c 0-95 nohup python /home/models/official/nlp/Bert/run_pretrain.py --distribute=true --epoch_size=40 --enable_save_ckpt=true --do_shuffle=true --enable_data_sink=true --data_sink_steps=100 --accumulation_steps=1 --allreduce_post_accumulation=true --save_checkpoint_path=./ --save_checkpoint_num=1 --config_path=../../pretrain_config.yaml --data_dir=/home/zhwiki-latest-mindrecord/ --device_id=0 --device_num=2 >./pretraining_log.txt 2>&1 &
cd -
echo "run with rank_id=0 device_id=6 logic_id=0"

export DEVICE_ID=1
export RANK_ID=1
export DEPLOY_MODE=0
export GE_USE_STATIC_MEMORY=1
rm -rf LOG1
mkdir ./LOG1
cp *.py ./LOG1
mkdir -p ./LOG1/ms_log
env > ./LOG1/env.log
export GLOG_log_dir=/home/models/official/nlp/Bert/LOG1/ms_log
export GLOG_logtostderr=0
cd /home/models/official/nlp/Bert/LOG1
taskset -c 96-191 nohup python /home/models/official/nlp/Bert/run_pretrain.py --distribute=true --epoch_size=40 --enable_save_ckpt=true --do_shuffle=true --enable_data_sink=true --data_sink_steps=100 --accumulation_steps=1 --allreduce_post_accumulation=true --save_checkpoint_path=./ --save_checkpoint_num=1 --config_path=../../pretrain_config.yaml --data_dir=/home/zhwiki-latest-mindrecord/ --device_id=1 --device_num=2 >./pretraining_log.txt 2>&1 &
cd -
echo "run with rank_id=1 device_id=7 logic_id=1"

